From 688a72df23eb67eac3bd1d9eeeb1c82b1a200425 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Tue, 2 Dec 2003 23:22:14 +0000 Subject: [PATCH] Fixed problem where one route would get split into many smaller routes --- gpsbabel/saroute.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gpsbabel/saroute.c b/gpsbabel/saroute.c index 7d795e652..276967e8c 100644 --- a/gpsbabel/saroute.c +++ b/gpsbabel/saroute.c @@ -183,9 +183,11 @@ my_read(void) * routing begins here */ count = ReadLong(infile); - while (count) { + if ( count ) { track_head = route_head_alloc(); route_add_head(track_head); + } + while (count) { ReadShort(infile); recsize = ReadLong(infile); record = ReadRecord(infile, recsize); -- 2.30.2